package edu.cuc.spring.config.nettyConfig;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.nio.NioEventLoopGroup;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("edu.cuc.spring.config")
public class NettyConfig {
    @Bean("workGroup")
    public NioEventLoopGroup workGroup() {
        return new NioEventLoopGroup();
    }

    @Bean("bossGroup")
    public NioEventLoopGroup bossGroup() {
        return new NioEventLoopGroup();
    }

    @Bean("bootStrap")
    public ServerBootstrap serverBootstrap() {
        return new ServerBootstrap();
    }

}
